package net.csdn.business.mirror.controller.inner;

import net.csdn.business.common.domain.ResponseResult;
import net.csdn.business.mirror.service.ScheduleTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController()
@RequestMapping("/api/inner/ops/v1")
public class OpsController {

    @Autowired
    private ScheduleTaskService scheduleTaskService;

    @GetMapping("/sendRefreshScheduleTask")
    public ResponseResult<Object> sendRefreshCacheCommand() {
        scheduleTaskService.rebuild();
        return ResponseResult.success();
    }
}
